package com.hongyuan.sellfitness.ui.person.activity;

import android.os.Bundle;

import com.hongyuan.sellfitness.R;
import com.hongyuan.sellfitness.base.CustomActivity;
import com.hongyuan.sellfitness.base.CustomViewModel;
import com.hongyuan.sellfitness.databinding.ActivityMyCouponBinding;
import com.hongyuan.sellfitness.ui.person.viewpage_adapter.MyCouponViewPagerAdapter;
import me.tatarka.bindingcollectionadapter2.BR;

public class MyCouponActivity extends CustomActivity<ActivityMyCouponBinding, CustomViewModel> {

    @Override
    public int initContentView(Bundle savedInstanceState) {
        return R.layout.activity_my_coupon;
    }

    @Override
    public int initVariableId() {
        return BR.viewModel;
    }

    @Override
    public void initView() {
        super.initView();

        binding.mViewPager.setAdapter(new MyCouponViewPagerAdapter(getSupportFragmentManager()));
        binding.tab.setupWithViewPager(binding.mViewPager);

        binding.comBack.setOnClickListener(view -> finish());

        binding.goCouponHub.setOnClickListener(view -> {
            startActivity(CouponHubActivity.class);
        });
    }
}
